PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUSetAttributes

Sets style run attribute values in a style object.

OSStatus ATSUSetAttributes (
                     ATSUStyle iStyle,
                     ItemCount iAttributeCount,
                     ATSUAttributeTag iTag[],
                     ByteCount iValueSize[],
                     ATSUAttributeValuePtr iValue[]);
iStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose style run attributes you want to set. You cannot pass NULL for this parameter.

iAttributeCount
The number of style run attributes you want to set. This value should correspond to the number of elements in the iTag and iValueSize arrays.

iTag
An array of values of type ATSUAttributeTag. Each element in the array must contain a valid tag that corresponds to the style run attribute value you wish to set. See Style Run Attribute Tag Constants for a description of the Apple-defined style run attribute tag constants. If you pass a text layout attribute tag constant or an ATSUI-reserved tag constant in this parameter, ATSUSetAttributes returns the result code kATSUInvalidAttributeTagErr. You cannot pass NULL for this parameter.

iValueSize
An array of values of type ByteCount. Each element in the array must contain the size (in bytes) of the corresponding style run attribute value being set. If you pass a size that is less than required, ATSUSetAttributes returns the result code kATSUInvalidAttributeSizeErr, and the function sets no attributes. If, after having checked all the given sizes and found them acceptable, ATSUSetAttributes sets style run attributes. You cannot pass NULL for this parameter.

iValue
An array of pointers of type ATSUAttributeValuePtr. Each pointer in the array must reference a style run attribute value that corresponds to a tag in the iTag array, and the value referenced by the pointer must be legal for that tag. If you pass an invalid or undefined value, ATSUSetAttributes returns the result code kATSUInvalidAttributeValueErr. You cannot pass NULL for this parameter.

function result
A result code. If there is a function error, ATSUSetAttributes will not set any style run attributes. If you try to set the font attribute identified by the tag constant kATSUFontTag, the result code kATSUNoFontCmapAvailableErr indicates that no 'CMAP' table can be accessed or synthesized for the font. The result code kATSUNoFontScalerAvailableErr indicates that there is no font scaler available for the font.For a list of other ATSUI-specific result codes, see Result Codes.
DISCUSSION
The ATSUSetAttributes function sets one or more style run attribute value(s) for a style object. Unset style run attributes retain the default values listed in Table C-1.

SPECIAL CONSIDERATIONS
ATSUSetAttributes may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)